<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>鑫乐居——首页</title>
	<link href="css/bootstrap.min.css" rel="stylesheet">
	<script src="js/jquery.js"></script>
  <script src="js/bootstrap.min.js"></script>
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <link rel="stylesheet" href="css/download.css">
	<!--[if it IE 9]>
	<scritp src="html5shiv.js"></script>
	<script src="respond.min.js"></script>
	<![end if]-->
  <script type="text/javascript">
    window.onload = function () {
      var ckf = document.getElementById('ckf');
      var okf = document.getElementById('okf');
      var kf = document.getElementById('kf');
      var sh = document.getElementById('sh');
      var cl = document.getElementById('cl');
      var mix = document.getElementById('mix');
      var ques = document.getElementById('ques');
      var lyb = document.getElementById('lyb');
      mix.onclick = function () {
        ques.style.display = "block";
        lyb.style.display = "none";
      }
      ques.onclick = function () {
        lyb.style.display = "block";
        ques.style.display = "none";
      }
      ckf.onclick = function () {
        okf.style.display = "block";
        kf.style.display = "none";
      }
      okf.onclick = function () {
        kf.style.display = "block";
        okf.style.display = "none";
      }
      cl.onclick = function () {
        zx.style.display = "none";
        if (zx.style.display = "none") {
          setInterval("zx.style.display = 'block'",5000);
        }
      }
      sh.onclick = function () {
        zx.style.display = "none";
        if (zx.style.display = "none") {
          setInterval("zx.style.display = 'block'",5000);
        }
      }
    }
  </script>
</head>
<body>
	<form action="">
		<div id="cont">
			<div id="head">
				<div class="logo"></div>
				<div class="tel">
					<div class="phone"></div>
					<span>400-160-140</span>
				</div>
				<div class="dh">
					<ul>
						<?php
        include "shuju.php";
                    $db = new DB();
                    $sql = "select * from navigation where pid is null";
                    $res = $db->get($sql);
                    for ($i=1; $i <=count($res) ; $i++) {     
                        $fir = $res[$i-1][1];
                        $id = $res[$i-1][0];
                        $href = $res[$i-1][3];
                        echo "<li class='li1'><a href='$href'>$fir</a><ul>";
                        $sql = "select * from navigation where pid = '$id'";
                        $ss = $db->get($sql);
                        for ($j=1; $j <=count($ss) ; $j++) { 
                          $sec = $ss[$j-1][1];
                          $sechr = $ss[$j-1][3];
                          echo "<li><a href='$sechr'>$sec</a></li>";
                        }
                        echo"</ul></li>";
                    }
                  ?>
					</ul>
				</div>
			</div>
			<div id="banner"></div>
      <div id="con">
        <div class="bai">
          <p class="o2o"><b>鑫乐居O2O相关下载</b></p>
          <div class="logo"></div>
          <p class="app">鑫乐居APP由北京鑫乐居科技发展有限公司研发运营，是一款为业主提供移动互联网社区生<br>活服务的APP产品。</p>
          <p class="down">使用手机扫描以下二维码下载</p>
          <div class="ewm"></div>
          <div class="bps">
            <p class="bps1"><b>其他资源</b></p>
            <a href="" class="bps5"><div class="bps2"></div></a>
            <p class="bps3">2015鑫苑中国白皮书</p>
            <p class="bps4">鑫乐居APP由北京鑫乐居科技发展有限公司研发运营，是一款为业主提供移动互联网社区生<br>活服务的APP产品。</p>
          </div>
        </div>
      </div>

			</div>
			<div id="foot">
				<span>Copyright  2010-2015 All Rights Reserved. 京ICP备15041059号-1 京公网安备11010502027337 北京瑞卓喜创科技发展有限公司版权所有</span>
				<div class="hui"></div>
			</div>
		</div>
    <div id="kf">
        <div class="kf1"></div>
        <div class="kf2">
          <span>鑫乐居顾问</span>
          <div class="kf5">
            <div class="kk1"></div>
            <span>鑫乐居</span>
          </div>
          <div class="kf6">
            <div class="kk1"></div>
            <span>客服5</span>
          </div>
          <div class="kf7">
            <div class="kk1"></div>
            <span>客服9</span>
          </div>
        </div>
        <div class="kf3" id="ckf"></div>
      </div>
      <div class="kf4" id="okf"></div>
      <!-- 定时咨询弹出框 -->
      <div id="zx">
        <div class="close" id="cl"></div>
        <p>欢迎您，有什么可以帮助您的么？公司顾问在线为您解答。</p>
        <div class="btn btn-default" id="sh">稍后再说</div>
        <div class="btn btn-info" id="now">现在咨询</div>
      </div>
      <div id="lyb">
        <div class="mix" id="mix"></div>
        <div class="form">
          <textarea name="texta" id="texta" cols="30" rows="10" class="are" placeholder="请再次输入留言内容，我们会尽快与您联系。" onmouseleave="textayz()" ></textarea>
          <div class="text1" >
            <div class="name">姓名</div>
            <input type="text" class="name1" placeholder="最多100个字符" name="username" id="username" onmouseleave="nameyz()">
          </div>
          <div class="text2">
            <div class="phone">电话</div>
            <input type="text" placeholder="请输入您的手机号码" class="phone1" name="phone" id="phone" onmouseleave="phoneyz()">
          </div>
          <div class="text3">
            <div class="address">地址</div>
            <input type="text" placeholder="最多100个字符" class="address1" name="address" id="address" onmouseleave="addressyz()">
          </div>
          <div class="text4">
            <div class="email">邮箱</div>
            <input type="text" placeholder="请输入合法邮箱名" class="email1" name="email" id="email" onmouseleave="emailyz()">
          </div>
          <input type="submit" name="submit" class="sub" value="提交" id="sub">
        </div>
      </div>
      <div id="ques"></div>
	</form>
</body>
<script type="text/javascript">

    var texta = document.getElementById('texta');
    var username = document.getElementById('username');
    var phone = document.getElementById('phone');
    var address = document.getElementById('address');
    var email = document.getElementById('email');
    var sub = document.getElementById('sub');
    var biaodan = document.getElementById('biaodan');
//只验证表单字段长度
    sub.onclick = function () {
      if (texta.value == "") {
        alert("留言内容不能为空！");
        biaodan.action = "";
      }else{
        biaodan.action = "form.php";
      }
    }
</script>
</html>